import axios from 'axios'
axios.interceptors.response.use( function (response) {
    if (response.data.code === 200) {
        return response.data;
    } else {
        return Promise.reject(response.data);
    }
  }, function (error) {
    return Promise.reject(error);
  });

export let getCity = () => {
  return axios.get('/api/city');
};

export let getList = (data) => {
  return axios.post('/api/list', data);
};
